<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户地址')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-useraddress-edit" th:object="${jjyhUseraddress}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户ID：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货人姓名：</label>
                <div class="col-sm-8">
                    <input name="userName" th:field="*{userName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货人联系方式：</label>
                <div class="col-sm-8">
                    <input name="userPhone" th:field="*{userPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货省份编码：</label>
                <div class="col-sm-8">
                    <input name="addressProv" th:field="*{addressProv}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货省份名称：</label>
                <div class="col-sm-8">
                    <input name="addressProvname" th:field="*{addressProvname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货城市编码：</label>
                <div class="col-sm-8">
                    <input name="addressCity" th:field="*{addressCity}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货城市名称：</label>
                <div class="col-sm-8">
                    <input name="addressCityname" th:field="*{addressCityname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货区域编码：</label>
                <div class="col-sm-8">
                    <input name="addressDist" th:field="*{addressDist}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货区域名称：</label>
                <div class="col-sm-8">
                    <input name="addressDistname" th:field="*{addressDistname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货地址描述：</label>
                <div class="col-sm-8">
                    <input name="addressDesc" th:field="*{addressDesc}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否默认地址：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('is_default_address')}">
                        <input type="radio" th:id="${'isDefault_' + dict.dictCode}" name="isDefault" th:value="${dict.dictValue}" th:field="*{isDefault}">
                        <label th:for="${'isDefault_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "jjyh/useraddress";
        $("#form-useraddress-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-useraddress-edit').serialize());
            }
        }
    </script>
</body>
</html>